import request from '@/utils/request.js'
const PATH = '/user'

// 分页查询课程视频列表
export const getCourseVideoList = ({
  page,
  pageSize,
  courseName,
  categoryId
}) => {
  return request.get(PATH + '/courseVideo/pageQueryCourseVideo', {
    params: {
      page,
      pageSize,
      courseName,
      categoryId
    }
  })
}

// 根据id查询课程视频
export const getCourseVideoById = (id) => {
  return request.get(PATH + '/courseVideo/getCourseVideoById', {
    params: {
      id
    }
  })
}

// 修改视频点击量
export const updateClickCount = (id) => {
  return request.put(PATH + '/courseVideo/updateClickCount', {
    id
  })
}
